package cn.edu.jxust.common.domain.model;

import cn.edu.jxust.core.infrastructure.util.Cascadable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;

/**
 * @author QiuKangming
 * @version 1.0
 * @description 权限树形构建对象
 * @since 2020/07/01 14:53
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class AuthorityBuild implements Serializable, Cascadable<AuthorityBuild> {

    private static final long serialVersionUID=1L;
    private Integer id;
    private Integer parentId;
    private String resourceName;
    private String resourceCode;

    /**
     * 权限类型
     */
    private Integer resourceType;

    /**
     * 是否拥有该权限
     */
    private Integer isAuthced;

    /**
     * 子权限列表
     */
    private List<AuthorityBuild> children;

    @Override
    public Integer getId() {

        return id;

    }

    @Override
    public Integer getParentId() {

        return this.parentId;

    }

    @Override
    public List<AuthorityBuild> getChildren() {

        return this.children;

    }

    @Override
    public void setChildren(List<AuthorityBuild> children) {

        this.children = children;

    }
}
